package io.gbznt.common.constant;

/**
 * 开关类型；
 */
public enum PumStatu {
	/**
	 * 性别 	男
	 */
	SWITCH1(1,"男"),
	/**
	 * 性别 	女
	 */
	SWITCH2(2,"女"),
	/**
	 * 性别 	保密
	 */
	SECRECY(3,"保密");

	private final int value;
	
	private final String description;

	private PumStatu(int value,String description) {
		this.value = value;
		this.description = description;
	}

	public int getValue() {
		return value;
	}

	public String getDescription() {
		return description;
	}
	
	public static PumStatu getDescByValue(Integer value) {
		if (null == value) {
            return null;
        }
		for (PumStatu enumObj : PumStatu.values()) {
			if (value.equals(enumObj.getValue())) {
                return enumObj;
            }
		}
		return null;
	}
	
	public static PumStatu getOrganType(String description) {
		if (null == description) {
            return null;
        }
		for (PumStatu enumObj : PumStatu.values()) {
			if (description.equals(enumObj.getDescription())) {
                return enumObj;
            }
		}
		return null;
	}
	
}